{yun:}include file="$wapstyle/fheader.htm"{/yun}
<link rel="stylesheet" href="{yun:}$config_wapdomain{/yun}/js/mui/css/mui.picker.min.css?v={yun:}$config.cachecode{/yun}" type="text/css" />
<link rel="stylesheet" href="{yun:}$config.sy_weburl{/yun}/app/template/wap/css/style.css?v={yun:}$config.cachecode{/yun}" type="text/css" />
<script>
    (function() {
        var num = '{yun:}$nopayorder{/yun}';

        if(parseInt(num) > 0) {
            layer.open({
                content: '您还有{yun:}$nopayorder{/yun}个订单未付款，是否继续充值！',
                btn: ['去付款', '继续充值'],
                shadeClose: false,
                yes: function() {
                    setTimeout(function() {
                        location.href = 'index.php?c=free&a=paylog';
                    }, 0);
                }
            });
        }

    })()
    var gq_pay = '{yun:}$config.gq_pay_price{/yun}';
</script>
<div id="app" class="mui-views">
    <div class="mui-view">
        <div class="mui-pages"></div>
    </div>
</div>
<!--页面主结构结束-->
<!--单页面开始-->
<div id="main" class="mui-page">
    <!--页面主内容区开始-->
    <div class="mui-page-content">
        <div class="mui-scroll-wrapper">
            <div class="mui-scroll">
                {yun:}if $smarty.get.type=='refresh'{/yun}
                <div class="pay_choice_box">
					<form action="index.php?c=free&a=dingdan" method="post" onsubmit="return pay_form();">
						<div class="pay_xymoney">
							<span class="pay_xymoney_name">所需金额</span><div class="pay_xymoney_t"><em class="pay_xymoney_t_n"><span id="price">{yun:}$config.gq_refrsh_pay{/yun}</span></em> 元</div>
						</div>
                        <div class="member_set_meal_fk_fbox mt10">
                            {yun:}if $config.wxpay==1{/yun}

                            <div class="member_set_meal_fk_fs member_set_meal_fk_fs_wx" onclick="paycheck('wxpay');">
                                <i class="wxpay member_set_meal_fk_xz"></i>微信支付
                            </div>
                            {yun:}/if{/yun} {yun:}if $config.alipay==1{/yun}
                            <div class="member_set_meal_fk_fs member_set_meal_fk_fs_zfb" onclick="paycheck('alipay');">
                                <i class="alipay member_set_meal_fk_xz"></i>支付宝
                            </div>

                            {yun:}/if{/yun} 
                        </div>
						{yun:}if $config.wxpay==1 || $config.alipay==1{/yun}
						<div class="member_set_meal_fk_zf">
                            <input type="submit" class="member_set_meal_fk_zf_bth" value="确认支付">
                        </div>
						{yun:}else{/yun}
						 <div class="pay_zfgb_tip">
							<span>网站已关闭支付功能，请联系管理员！</span>
						</div>
						{yun:}/if{/yun}
						<input type="hidden" value="refresh" name="type" />
						<input type="hidden" value="" id="paytype" name="paytype" />
						<input type="hidden" value="{yun:}$smarty.get.id{/yun}" name="id" />
					</form>
                </div>
				{yun:}else{/yun}
                <div class="pay_choice_box">
					<form action="index.php?c=free&a=dingdan" method="post" onsubmit="return pay_form();">
						<div class="pay_xymoney">
							<span class="pay_xymoney_name">所需金额</span><div class="pay_xymoney_t"><em class="pay_xymoney_t_n"><span id="price">{yun:}$config.gq_pay_price{/yun}</span></em> 元</div>
						</div>
                        <div class="member_set_meal_fk_fbox mt10">
                            {yun:}if $config.wxpay==1{/yun}

                            <div class="member_set_meal_fk_fs member_set_meal_fk_fs_wx" onclick="paycheckt('wxpay');">
                                <i class="wxpay member_set_meal_fk_xz"></i>微信支付
                            </div>
                            {yun:}/if{/yun} {yun:}if $config.alipay==1{/yun}
                            <div class="member_set_meal_fk_fs member_set_meal_fk_fs_zfb" onclick="paycheckt('alipay');">
                                <i class="alipay member_set_meal_fk_xz"></i>支付宝
                            </div>

                            {yun:}/if{/yun} 
                        </div>
						{yun:}if $config.wxpay==1 || $config.alipay==1{/yun}
						<div class="member_set_meal_fk_zf">
                            <input type="submit" class="member_set_meal_fk_zf_bth" value="确认支付">
                        </div>
						{yun:}else{/yun}
						 <div class="pay_zfgb_tip">
							<span>网站已关闭支付功能，请联系管理员！</span>
						</div>
						{yun:}/if{/yun}
						<input type="hidden" value="" id="paytype" name="paytype" />
						<input type="hidden" value="{yun:}$smarty.get.id{/yun}" name="id" />
					</form>
                </div>
				{yun:}/if{/yun}
            </div>

        </div>
    </div>
    <!--页面主内容区结束-->
</div>
<!--单页面结束-->

<script src="{yun:}$config_wapdomain{/yun}/js/mui/mui.picker.min.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config_wapdomain{/yun}/js/mui/mui.view.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script language="javascript">
    mui.init();
    var viewApi = mui('#app').view({
        defaultPage: '#main'
    });
    //初始化单页的区域滚动
    mui('.mui-scroll-wrapper').scroll();
    var view = viewApi.view;
    (function($) {
        //处理view的后退与webview后退
        var oldBack = $.back;
        $.back = function() {
            if(viewApi.canBack()) { //如果view可以后退，则执行view的后退
                viewApi.back();
            } else { //执行webview后退
                oldBack();
            }
        };
    })(mui);
    function paycheckt(type) {
    var type;
    if(type == "wxpay") {
      $(".wxpay").addClass("member_set_meal_fk_xz_cur");
      $(".alipay").removeClass("member_set_meal_fk_xz_cur");
      $(".bank").removeClass("member_set_meal_fk_xz_cur");
      $("#paytype").val('wxpay');
      $(".paybank").hide();
      $("#div_coupon").show();
      $("#paymentform").attr("action", wapurl+"index.php?c=free&a=dingdan");
    } else if(type == "alipay") {
      $(".alipay").addClass("member_set_meal_fk_xz_cur");
      $(".wxpay").removeClass("member_set_meal_fk_xz_cur");
      $(".bank").removeClass("member_set_meal_fk_xz_cur");
      $("#paytype").val('alipay');
      $(".paybank").hide();
      $("#div_coupon").show();
      $("#paymentform").attr("action", wapurl+"index.php?c=free&a=dingdan");
    }
}
</script>

{yun:}include file="$wapstyle/footer.htm"{/yun}